home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 0769A.ZIP / MEMOPO.DOC < prev    next >
Text File  |  1986-02-06  |  22KB  |  491 lines

  1.                           MEMOPO Version 2.0
  2.           The dBASE III Memo Field Utility for the Civilized
  3.                                01/31/86
  4.  
  5.              Copyright (c) 1985,86  P. L. Olympia, Ph.D.
  6.                          Darwin Systems, Inc.
  7.  
  8.  
  9.                            WHAT IS MEMOPO?
  10.  
  11.      Ever been frustrated by dBASE III's limited implementation of the 
  12. potentially  useful  MEMO  fields facility?   Don't you wish  you  can 
  13. import  text data created by your favorite text editor  or  downloaded 
  14. from a mainframe into your MEMO fields?  Don't you wish you can export 
  15. your memo fields to the screen,  file or printer, so that you may edit 
  16. them with your text editor,  search them for keywords,  etc?   Are you 
  17. tired of dBASE III ver 1.0,  1.1.,  1.2 and dBASE III Plus taking lots 
  18. of space for your memo fields or taking forever to pack or  reorganize 
  19. your DBT files?
  20.  
  21.      Yes? You need MEMOPO!
  22.  
  23.      MEMOPO  allows  you to 
  24.  
  25.  1.  Load  text data created elsewhere to one or more memo fields - no 
  26.      limit  on the length of the text data and no practical  limit  on 
  27.      the number of dBASE records or memo fields.
  28.  
  29.  2.  Display  ONE or ALL memo fields' contents to the screen,  printer 
  30.      or  file in the EXACT form that you entered them.  When the  data 
  31.      are directed to a file,  you can use your favorite text editor to 
  32.      search for keywords,  modify the data,  load them right back,  or 
  33.      include them in your reports.
  34.  
  35.  3.  Reorganize  (pack) your DBT files so that all unused  and  wasted 
  36.      space disappears in 1/10 the time it takes dBASE to do the same - 
  37.      and you don't even need dBASE!
  38.  
  39.  4.  Do all of the above in DOS,  as part of a batch job  (unattended) 
  40.      execution  or from within dBASE as part of your PRG command  file 
  41.      without any need for your user to interact with the program.
  42.  
  43.  5.  Do all of the above F-A-S-T.
  44.  
  45.  
  46.      The program works under PC-DOS for files created by all  versions 
  47. of dBASE III,  including dBASE III Plus.   You don't need dBASE to run 
  48. the program, but you may run it while under dBASE control. It has full 
  49. path and subdirectory support.
  50.  
  51.      The  size  of  the  text data that you can import  or  export  is 
  52. limited only by your disk space, your printer ribbon or your patience.  
  53. There  is  no limit on the size of the DBF or DBT files that  you  can 
  54. work  on.  You can work on as many as 10 memo fields per data base  (I 
  55. just  had to set this at some number - show me someone who  uses  more 
  56. than  10  memo fields per data base and I'll show you a nerd).
  57.  
  58.  
  59.  
  60.  
  61.                           WHAT IS IN THE PACKAGE
  62.  
  63. MEMOPO.COM   (the real thing, NOT public domain)  -or-
  64. MEMODPO.COM  (the demo version, can be freely distributed)
  65.  
  66. MEMOPO.DOC   This file you are reading
  67. MEMOPO.DBF   Sample dBASE III data base file you can use to test the pgm
  68. MEMOPO.DBT   Sample dBASE III file containing memo field data 
  69. MEMOPO.TXT   Sample  externally  prepared file containing data  that  you 
  70.                want to load into the sample DBT file
  71.  
  72.  
  73.  
  74.                     HOW ABOUT A LITTLE BACKGROUND?
  75.  
  76.  
  77.      Rather than waste space here to digress on the use,  features and 
  78. misfeatures of MEMO fields as currently implemented in all versions of 
  79. dBASE  III,  I  will  simply refer you to  my  article,  "Memo  Fields 
  80. Explained",  which  appeared in the February 1986 issue of Data  Based 
  81. Advisor.   There,  I talked about the structure of DBT and DBT  files, 
  82. and how you get around some of the problems of MEMO fields.
  83.  
  84.  
  85.  
  86.                            COMMAND SUMMARY
  87.  
  88.  
  89.      The  program may be invoked from DOS,  from a batch file or  from 
  90. within dBASE via the RUN or ! command.  The command syntax is:
  91.  
  92.      MEMOPO <function>  <parameters>
  93.  
  94. <function>     is   one   of   the   following:   <I>mport,   <E>port, 
  95.                <R>eorganize.   You may use the first letter or you may 
  96.                type the whole word if you love to type that much.  The 
  97.                program  also  recognizes  the function  <P>ack  to  be 
  98.                synonymous to <R>eorganize.
  99.  
  100. <parameters>   consist  of filenames,  data base record or memo  field 
  101.                number(s)  that are used by the specific function  that 
  102.                you  wish  the program to perform.  Each  parameter  is 
  103.                separated from the next by a single space.
  104.  
  105.  
  106. Here is a summary of the command syntax for all functions:
  107. NOTE: If you are using the DEMO version, change call occurrences of
  108.       MEMOPO with MEMODPO
  109.  
  110.   +---------------------------------------------------------+
  111.   |   MEMOPO R <dbf-file>                                   |
  112.   |                                                         |
  113.   |   MEMOPO I <dbf-file> <script-file>                     |
  114.   |   MEMOPO I <dbf-file> <txt-file> <dbf-recnum> <memonum> |
  115.   |                                                         |
  116.   |   MEMOPO E <dbf-file> <dbf-recnum> <memonum> [>dosdev]  |
  117.   +---------------------------------------------------------+
  118.   
  119.  
  120. <dbf-file>     The  name  of  your  DBF file.  You may  omit  the  DBF 
  121.                extension,  and you may prefix the name with the  drive 
  122.                or  subdirectory where the file is located.  IMPT:  The 
  123.                program  expects to find the corresponding DBT file  in 
  124.                the same drive/subdirectory.
  125.  
  126. <script-file>  The  name of the text file containing the text data  to 
  127.                load  into the memo fields and directives (called  FLAG 
  128.                records)  on  which  DBF record number and  which  memo 
  129.                field (if more than one) to load those data into.   The 
  130.                filename may be qualified with  drive/subdirectory.  It 
  131.                does NOT have to be in the same drive/subdirectory that 
  132.                contains  the  DBF and DBT files.   If the filetype  is 
  133.                omitted, the program assumes a filetype of TXT. If the 
  134.                file does NOT have a filetype (WHY?) you MUST terminate 
  135.                the filename with a period.
  136.  
  137. <txt-file>     The name of the text file containing the data to import 
  138.                to  a  specific  DBF record  number-memo  field  number 
  139.                combination.  It differs from the <script-file> in that 
  140.                it does NOT contain FLAG records.  Everything else said 
  141.                above for <script-file> applies here also. 
  142.  
  143. <dbf-recnum>   A  single number or a range of numbers separated  by  a 
  144.                dash  (example,  2-36)  which signifies the  data  base 
  145.                record number(s) which is the target of the operation.
  146.  
  147. <memonum>      A  single  number or a range of numbers separated by  a 
  148.                dash  (example,  1-2)  which signifies the  memo  field 
  149.                number  which is the target of the operation.  This  is 
  150.                always optional.  If omitted,  memo number 1 is  always 
  151.                assumed.   This  is handy for those with only one  memo 
  152.                field in their data base.
  153.  
  154. <dosdev>       Any  valid dos device (example PRN) or a filename which 
  155.                will receive the EXPORTed data.  If omitted,  the  data 
  156.                are displayed on the screen only.  The data will always 
  157.                be   displayed   on-screen  even  as  they  are   being 
  158.                redirected to <dosdev>.
  159.  
  160.   
  161.  
  162.                       REORGANIZE (PACK) FUNCTION
  163.  
  164. PURPOSE   Rids the DBT file of unused space and makes your memo field 
  165.           operations more efficient.
  166.  
  167. SYNTAX    MEMOPO R <dbf-file>
  168.  
  169. EXAMPLES  MEMOPO R C:\DBASE\DARWIN.DBF
  170.           MEMOPO R DARWIN
  171.  
  172. NOTES     The program will NOT destroy your old DBT file.  The old DBT 
  173.           file  will be created on the same  drive/subdirectory  where 
  174.           the  DBF file is,  and will be given the filetype of ".OLD". 
  175.           Therefore,  you  must  have  enough space on  the  drive  to 
  176.           accommodate at most another copy of the original DBT file.
  177.  
  178.           The  screen  will show the program's progress by  displaying 
  179.           the counts of DBF/DBT records that it has processed.
  180.  
  181.  
  182.  
  183.                            EXPORT FUNCTION
  184.  
  185. PURPOSE   List  or display the contents of one or more memo fields  to 
  186.           the  screen  or  redirect them to a file or  any  valid  DOS 
  187.           device  such  as a printer.   The exported data may then  be 
  188.           included in reports,  searched for keywords,  edited for re-
  189.           loading with MEMOPO's <I>mport function.
  190.  
  191. SYNTAX    MEMOPO E <dbf-file> <dbf-recnum> <memonum> [>dosdev]  
  192.           <dbf-recnum> and <memonum> may specify a range,
  193.  
  194. EXAMPLES  MEMOPO E C:\DB\DARWIN.DBF 8 2 >A:MEMO.TXT
  195.           MEMOPO E MYDBF 1-20 1-6 >PRN
  196.           MEMOPO E YOURDBF 7
  197.  
  198.           The first example lists the contents of DBF record number 8, 
  199.           memo  field  2  of the database DARWIN.DBF  located  in  the 
  200.           drive/subdirectory  C:\DB  to  the screen and  to  the  file 
  201.           MEMO.TXT on the A: drive.
  202.  
  203.           The second example lists the contents of all memo fields 1-6 
  204.           contained in DBF records 1-20 to the screen and printer. The 
  205.           data  base  file MYDBF.DBF and its  associated  memo  field 
  206.           file, MYDBF.DBT are assumed to be in the default directory.
  207.  
  208.           The  third  example  lists  the contents  of  memo  field  1 
  209.           (assumed if <memonum> is not specified) of DBF record 7.
  210.  
  211. NOTES     The  display format is exactly the format that you  used  to 
  212.           load  the  data with MEMOPO's <I>mport function.  All  CR-LF 
  213.           sequences  are  preserved so if your data  contain  columnar 
  214.           tables, you will get the tables in exactly the form that you 
  215.           entered them.
  216.  
  217.           The  program  is smart enough to know that if you specify  a 
  218.           range of numbers in non-sensical fashion,  such as 20-1, you 
  219.           really mean 1-20.
  220.  
  221.           The  output will be each memo field's text content  preceded 
  222.           by  a  FLAG record which identifies the  record  number/memo 
  223.           number combination which is the source of the data.  This is 
  224.           useful for several reasons,  one of which is that it already 
  225.           is  in  the form suitable for <I>mport after  you  make  any 
  226.           necessary  edits to your data.  
  227.  
  228.           An example of a FLAG record is:  
  229.                ~20,3
  230.           where  "~" is the flag symbol,  20 is the DBF record  number 
  231.           and 3 is the memo field number.
  232.  
  233.           If  the  DBT  record  is empty,  the  output  line  will  be 
  234.           something like:
  235.                     ~5,2 *No data*
  236.           meaning  that DBF record 5,  memo number 2 has no data.  You 
  237.           should  get rid of this line before importing the text  back 
  238.           unless  you are going to add data to 5,2 or unless you  like 
  239.           wasting DBT space.
  240.  
  241.  
  242.  
  243.  
  244.                            IMPORT FUNCTION
  245.  
  246. PURPOSE   Load  text  data of unlimited length (up to about 128  bytes 
  247.           per  line)  to  one or more memo fields  in  any  data  base 
  248.           record(s).   The  text  data  may have  originated  anywhere 
  249.           including a mainframe.
  250.  
  251.  
  252. SYNTAX    Form 1:   MEMOPO I <dbf-file> <script-file>    
  253.           Form 2:   MEMOPO I <dbf-file> <txt-file> <dbf-recnum> <memonum>
  254.  
  255.           Form  1  uses a previously prepared script  file  containing 
  256.           flag  records and the actual memo field text.  Use this  for 
  257.           loading  data  to any number of memo fields  with  a  single 
  258.           command invocation.
  259.  
  260.           Form  2  is  used  to load a text  file  (no  embedded  flag 
  261.           records) to a specific memo field of a specified DBF record.
  262.  
  263. EXAMPLES  MEMOPO I MYDBF.DBF D:\WS\MYSCRIPT.TXT 
  264.           MEMOPO I C:\DB\MYDBF A:MYTEXT 11 2
  265.  
  266.           The  second  example loads text data contained in  the  file 
  267.           MYTEXT.TXT  on  the A:  drive to memo field number 2 of  DBF 
  268.           record   11   of  the  database  MYDBF.DBF  in   the   C:\DB 
  269.           subdirectory.
  270.  
  271. NOTES     The instructions for creating your script file is covered in 
  272.           the next section.
  273.  
  274.           If  no filetypes are used for the script or  text  files,  a 
  275.           filetype  of TXT is assumed.  If these filenames really have 
  276.           no filetypes, end the filename with a period.
  277.  
  278.           <dbf-recnum>  and  <memonum> in Form 2 must  NOT  specify  a 
  279.           range as it is non-sensical to do so.  They must be a single 
  280.           number (not a range of numbers).
  281.  
  282.           The program will show you its progress on the screen.
  283.  
  284.  
  285.                    HOW TO PREPARE YOUR SCRIPT FILE
  286.  
  287.      A script file can result from a previous <E>xport operation of  a 
  288. range of DBF and DBT records. If you are starting from scratch or  you
  289. want  to create your own script file with your editor,  the  following 
  290. will provide you with the necessary instructions.
  291.  
  292.      During an <I>mport operation where you wish to import a series of 
  293. data  to more than one memo field-DBF record number  combination,  the 
  294. program needs to know which segments of your script (text) file belong  
  295. to  which   data  base record and which memo field (if you  have  more 
  296. than   one).  You  do that by preceding appropriate blocks of text  in 
  297. your script file  by what  is  called  a "FLAG RECORD".  A flag record 
  298. is  simply  a  text  line containing a symbol (that you choose),   the 
  299. data base record number and the memo  field  number that the following 
  300. text lines are destined to  go.  The data (text) lines are loaded into 
  301. the appropriate places in your DBT  file, until the program encounters 
  302. another FLAG RECORD or the end of (TXT) file.
  303.  
  304.      Here is a sample FLAG RECORD:
  305.  
  306.           %5,2
  307.  
  308.  1.  The   "%"  is  your chosen flag symbol.   You must  choose   this  
  309.      symbol carefully so that it NEVER appears as the first  character 
  310.      of  a line in your  memo  field  data.   The program will try  to  
  311.      accommodate  you  by accepting just about any special symbols you 
  312.      like.  If you were foolish enough  to  choose  a nonsensical flag 
  313.      symbol,   it will give  you  the appropriate error message, and a 
  314.      list of valid flag symbols.
  315.  
  316.      The   program  expects  to find your chosen flag symbol  as   the  
  317.      FIRST  character  of the first line (flag record) in your  SCRIPT 
  318.      file.
  319.  
  320.  2.  The  "5"  means that the following data lines belong to the   5th  
  321.      data  base  record (DBF file).   This means the  PHYSICAL  RECORD 
  322.      number  5,   not  the logical one presented to you when an  index 
  323.      file is in use.
  324.  
  325.  3.  The comma is needed if there is a number following it.
  326.  
  327.  4.  The  "2"  refers to which memo field (if you have more than  one)  
  328.      the following data lines are to be loaded.   It is optional.   If 
  329.      omitted,  a "1" is always assumed.  If you omit it, you must also 
  330.      omit the comma.
  331.  
  332. In summary then:
  333.  
  334.      %5,2
  335.  
  336.      means that the following text lines (until another flag record or  
  337.      end  of  file is encountered) should be placed in memo field 2 in 
  338.      data base record 5.
  339.  
  340. Study   the  MEMOPO.TXT  sample file provided and use  that  as   your 
  341. guide. That file contains additional tutorial material.
  342.  
  343.  
  344.                                WARNING
  345.  
  346.      On <I>mport or <R>eorganize functions the program alters both DBF 
  347. and DBT files.  Make sure that you run the program  on a copy of these 
  348. files,  NOT the original.   By  necessity,  the program  updates  data 
  349. base headers at appropriate times,   usually after  a record  has been 
  350. changed.    If  the  program aborts because of   unrecoverable  errors  
  351. caused by you,   or because of power interruptions,   it is always   a 
  352. good  idea to start over with a new copy of the DBF and DBT files.  
  353.  
  354.      I   have   used  this program extensively and have found  it   to  
  355. work  as expected.   However,  I  am  obligated to say right here that 
  356. you  use  the program  at your own risk (whatever that may  be).    If 
  357. the  program does not seem to work for you,  drop me a note,  and if I 
  358. cannot  resolve  your problem,  I will cheerfully refund  your  money.  
  359. Those using only the DEMO program are also encouraged to provide  some 
  360. feedback  - please  write or call my  BBS.   I can't respond to  phone 
  361. calls.
  362.  
  363.  
  364.  
  365.                          USER FEEDBACK WANTED
  366.  
  367.      I  will  be interested in hearing about any problems  or  desired 
  368. enhancements to the program. This program partly solves the problem of 
  369. searching memo fields for keywords.  Is a search function  needed?  If 
  370. so,  what  should it report back?  Just the record number/memo  number 
  371. combination, or something more?
  372.  
  373.  
  374.                       COMMON INVOCATION PROBLEM
  375.  
  376.      If you choose not to specify <memonum> (letting it default to  1) 
  377. you  must remember not to space before pressing <CR>.  Otherwise,  the 
  378. DOS  command  line parsing will cause the program to  think  that  you 
  379. specified a memonumber of 0 which is, of course, invalid.  I have made 
  380. the  appropriate "fault tolerance" on <E>xport but did not want to  be 
  381. so presumptuous for an <I>mport function which modifies your data.
  382.  
  383.  
  384.              WHY AM I NOT USING SHAREWARE ON THIS PROGRAM?
  385.  
  386.      Many  of you have probably seen or used a number of  my  programs 
  387. (for example,  DB3FIXPO,  DSIDCAT, CALPO3) which I have contributed to 
  388. the  public  domain.   These  programs  are completely  free  and  are 
  389. available  from most BBS or from my own Darwin BBS which is  free  and 
  390. open  to  the  public.   I also have some  "Shareware"  programs,  for 
  391. example,  FCPO1 - an electronic filing cabinet system.  Unfortunately, 
  392. the "shareware" experiment has failed for me.  I see FCPO1 being  used 
  393. by corporations and Government agencies all over the country and those 
  394. users  do  not have the conscience to make the "shareware"  experiment 
  395. work.   So,  I  apologize  to  all  of you for  dropping  out  of  the 
  396. experiment.
  397.  
  398.      On the other hand,  I, too, have been burned many times by buying 
  399. commercial  software  that  do not work as  intended  - precisely  the 
  400. problem that is avoided by "shareware".   My conscience tells me  that 
  401. you should have the opportunity to check out a program and buy it only 
  402. after  you  have  seen how it works.   Therefore,  I  am  releasing  a 
  403. demonstration copy of the program to the public domain so you may have 
  404. the opportunity to see whether the program is something you need.  The 
  405. demo  version  has all the features of the production  version  EXCEPT 
  406. that  you are limited to about 10 DBF records.   If you want to  order 
  407. the production version, please send the form at the end of this file.
  408.  
  409.      All  those  who had ordered DBMEMOPO version 1.1 and 1.3 will  be 
  410. shipped a copy of the production version as a free update.
  411.  
  412.      Why  don't I just release this program to the public domain  like 
  413. the others?  A good question.   I am trying to raise money to keep  my 
  414. BBS operating.  I can do that by charging a subscription fee, but that 
  415. is  against  my philosophy.   I understand and do not criticize  those 
  416. Sysops  who have chosen to go subscription.   Operating a  first-class 
  417. BBS is NOT cheap.  I just happen to belong to that group of people who 
  418. believes  that  a BBS should be open and free,  and would rather  shut 
  419. down  a BBS than charge a fee.  I am not too crazy about  fund-raising 
  420. either but forgetting for the moment that I spent several weeks of  my 
  421. life on this program,  I need the funds to keep a BBS for as long as I 
  422. can.
  423.  
  424.      So  think of the money that you are going to pay for the  program 
  425. as a contribution for a worthy cause. Peace be with you, Brother.
  426.  
  427.  
  428.                     CALLING ALL dBASE CONSULTANTS
  429.  
  430.      
  431.      All  dBASE programmers who would like to bundle the program  with 
  432. some  of their applications may contact me for licensing arrangements. 
  433. It will be dirt cheap.  I also want to take this opportunity to invite 
  434. all  dBASE fanatics who have the spirit of sharing to join  the  dBASE 
  435. conference on my BBS.
  436.  
  437.      While I'm at it,  I also want to request those Sysops who carry a 
  438. data  base management section to help me out by keeping a copy of  the 
  439. DEMO  program in their download directory so others may have a  chance 
  440. to check it out.   If you have DBMEMDPO (now obsolete),  replace  that 
  441. with this one. Peace be with you, too.
  442.  
  443.  
  444.  
  445.                   HOW TO GET THE PRODUCTION VERSION
  446.  
  447.      You may order the production version,  by sending your contribution 
  448. and the filled-in form below to:
  449.  
  450.           P. L. Olympia
  451.           Darwin Systems, Inc.
  452.           17 Thorburn Rd.
  453.           Gaithersburg, MD  20878
  454.           Voice: 301-251-0497
  455.           BBS: 301-251-9206  (Darwin BBS, 1200/2400 bps, 24 Hrs)
  456.  
  457. Your contribution goes toward keeping the free Darwin BBS free.
  458.  
  459. In  return for your contribution,  you will get a PC-DOS diskette with 
  460. the   production   version,   and any other useful  public  domain  or 
  461. shareware  programs that I have (and,  of course,  I have a  lot).  If 
  462. there are any specific files you want, write their names on the form.
  463.  
  464.  
  465. ==========================================================================
  466.  
  467. ORDER FOR MEMOPO Version 2.0                       DATE _____________
  468.  
  469. NAME ___________________________________    PHONE _____________
  470.  
  471. COMPANY ___________________________________________
  472.  
  473. ADDRESS ____________________________________________ 
  474.  
  475.         ____________________________________________
  476.  
  477.         ____________________________________________
  478.  
  479.  
  480. FEEDBACK/COMMENTS:
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488. $35 Individual; $100 Corporate first copy, $10 additional copies
  489. ==========================================================================
  490.                           * End of MEMOPO.DOC *
  491.